package com.github.wxiaoqi.security.auth.service;


import com.github.wxiaoqi.security.auth.util.user.JwtAuthenticationRequest;

/**
 * token鉴权接口
 * @author dzl
 */
public interface AuthService {
    /**
     * 登录
     * @param authenticationRequest
     * @return
     * @throws Exception
     */
    String login(JwtAuthenticationRequest authenticationRequest) throws Exception;

    /**
     * 刷新
     * @param oldToken
     * @return
     * @throws Exception
     */
    String refresh(String oldToken) throws Exception;

    /**
     * 验证
     * @param token
     * @throws Exception
     */
    void validate(String token) throws Exception;
}
